﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;

namespace GComp.Apps.EasyStock.Utils {
    public class BackgroundConverter : IValueConverter {
        public object Convert(object value, Type targetType, object parameter, string language) {
            decimal change = (decimal)value;
            return new SolidColorBrush(change >= 0 ? Colors.LightGreen : Colors.IndianRed);
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language) {
            return null;
        }
    }
}
